package com.sitc.administrator.application.activity;

import android.os.Handler;
import android.os.Bundle;
import com.sitc.administrator.application.R;

public class SplashActivity extends BaseCommonActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);

    }

    @Override
    protected void initDatas() {


        Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {

                if (sp.isLogin()) {
                    startActivityAfterFinishThis(MainActivity.class);
                } else {
                    startActivityAfterFinishThis(LoginActivity.class);
                }

            }
        }, 200);


    }

    /**
     * 根据当前版本号判断是否需要引导页
     * @return
     */
    private boolean isShowGuide() {

        //return sp.getBoolean(String.valueOf(PackageUtil.getVersionCode(getApplicationContext())),true);

        return true;
    }




}
